/*
 *
 *  *  Copyright (C) 2018  Wanghaobin<463540703@qq.com>
 *
 *  *  AG-Enterprise 企业版源码
 *  *  郑重声明:
 *  *  如果你从其他途径获取到，请告知老A传播人，奖励1000。
 *  *  老A将追究授予人和传播人的法律责任!
 *
 *  *  This program is free software; you can redistribute it and/or modify
 *  *  it under the terms of the GNU General Public License as published by
 *  *  the Free Software Foundation; either version 2 of the License, or
 *  *  (at your option) any later version.
 *
 *  *  This program is distributed in the hope that it will be useful,
 *  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  *  GNU General Public License for more details.
 *
 *  *  You should have received a copy of the GNU General Public License along
 *  *  with this program; if not, write to the Free Software Foundation, Inc.,
 *  *  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 *
 */

package com.kuizii.base.common.configs.oss;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

import java.io.Serializable;
import java.util.Map;

/**
 * 云存储配置信息
 *
 * @author ace
 */
@Configuration
@ConfigurationProperties(prefix = "oss")
public class CloudStorageConfig implements Serializable {
    private static final long serialVersionUID = 1L;

    public CloudStorageConfig() {
    }

    public Map<String, QiniuOSSProperty> getQiniuOss() {
        return qiniuOss;
    }

    public void setQiniuOss(Map<String, QiniuOSSProperty> qiniuOss) {
        this.qiniuOss = qiniuOss;
    }

    public Map<String, UpyunOSSProperty> getUpyunOss() {
        return upyunOss;
    }

    public void setUpyunOss(Map<String, UpyunOSSProperty> upyunOss) {
        this.upyunOss = upyunOss;
    }

    public Map<String, QcloudOSSProperty> getQcloudOss() {
        return qcloudOss;
    }

    public void setQcloudOss(Map<String, QcloudOSSProperty> qcloudOss) {
        this.qcloudOss = qcloudOss;
    }

    public Map<String, AliyunOSSProperty> getAliyunOss() {
        return aliyunOss;
    }

    public void setAliyunOss(Map<String, AliyunOSSProperty> aliyunOss) {
        this.aliyunOss = aliyunOss;
    }

    public Map<String, QiniuOSSProperty> qiniuOss;
    public Map<String, UpyunOSSProperty> upyunOss;
    public Map<String, QcloudOSSProperty> qcloudOss;
    public Map<String, AliyunOSSProperty> aliyunOss;


    @Data
    public static class QiniuOSSProperty {

        boolean defaultUse;
        //七牛绑定的域名
        private String qiniuDomain;
        //七牛路径前缀
        private String qiniuPrefix;
        //七牛ACCESS_KEY
        private String qiniuAccessKey;
        //七牛SECRET_KEY
        private String qiniuSecretKey;
        //七牛存储空间名
        private String qiniuBucketName;
    }

    @Data
    public static class AliyunOSSProperty {
        boolean defaultUse;
        //阿里云绑定的域名
        private String aliyunDomain;
        //阿里云路径前缀
        private String aliyunPrefix;
        //阿里云EndPoint
        private String aliyunEndPoint;
        //阿里云AccessKeyId
        private String aliyunAccessKeyId;
        //阿里云AccessKeySecret
        private String aliyunAccessKeySecret;
        //阿里云BucketName
        private String aliyunBucketName;
    }

    @Data
    public static class QcloudOSSProperty {
        boolean defaultUse;
        //腾讯云绑定的域名
        private String qcloudDomain;
        //腾讯云路径前缀
        private String qcloudPrefix;
        //腾讯云AppId
        private Integer qcloudAppId;
        //腾讯云SecretId
        private String qcloudSecretId;
        //腾讯云SecretKey
        private String qcloudSecretKey;
        //腾讯云BucketName
        private String qcloudBucketName;
        //腾讯云COS所属地区
        private String qcloudRegion;
    }

    @Data
    public static class UpyunOSSProperty {
        boolean defaultUse;
        /**
         * 又拍绑定的域名
         */
        private String upyunDomain;
        //又拍路径前缀
        private String upyunPrefix;
        //又拍ACCESS_KEY
        private String upyunAccessKey;
        //又拍SECRET_KEY
        private String upyunSecretKey;
        //又拍存储空间名
        private String upyunBucketName;
    }


}
